# Contributor: dkrefft <dkrefft@posteo.de>
# Maintainer: dkrefft <dkrefft@posteo.de>
pkgname=ddserver
pkgver=0_git20200930
pkgrel=0
_commit="02b23b2cf451b2780a551861ef1eaaa10ca710ed"
pkgdesc="server to forward PTP USB messages between qDslrDashboard and USB camera"
url="https://github.com/hubaiz/DslrDashboardServer"
arch="all"
license="GPL-3.0-or-later"
options="!check" # no test suite
makedepends="libusb-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/hubaiz/DslrDashboardServer/archive/$_commit.tar.gz"
builddir="$srcdir/DslrDashboardServer-$_commit"

build() {
	make -C src/ \
	CXX="${CXX:-g++}" \
	CXXFLAGS="$CXXFLAGS $(pkg-config --cflags libusb-1.0)" \
	LIBS="-lpthread -lrt -lstdc++ $(pkg-config --libs libusb-1.0)"
}

package() {
	install -D -m755 src/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="85d25847506fa250abdc9d685e3fe9b5e49a57d6c583aea1e080dca683f36a8978ce48ce18e0956fde34c76931a155d7aeae53069a2afa0308a2850ac139a144  ddserver-02b23b2cf451b2780a551861ef1eaaa10ca710ed.tar.gz"

